import pandas as pd
import sqlite3

def csv_to_sqlite(file_name, sep = None):

    if sep == None:
        sep = ','
    else:
        sep = sep
    conn = sqlite3.connect('data.sqlite3')
    df = pd.read_csv(file_name, sep=sep, engine='python')
    name = file_name.replace('.', '_')
    print(name)
    try:
        df.to_sql(name, conn)
    except:
        pass

    return name



if __name__ == "__main__":
    csv_to_sqlite("chipotle.tsv",sep=r"\t")